package main

import (
	"context"
	"fmt"
	"net/url"
	"gowork/goKit/apiClientKit/service"

	httpTransport "github.com/go-kit/kit/transport/http"
)

func main() {
	tgt, _ := url.Parse("http://127.0.0.1:7777")
	client := httpTransport.NewClient("GET", tgt, service.GetUserRequest, service.PutUserResponse)
	userInfo := client.Endpoint()

	ctx := context.Background()
	res, err := userInfo(ctx, service.UserRequest{Uid: 101})
	if err != nil{
		fmt.Println(err)
	}

	fmt.Println(res.(service.UserResponse).Result)
}

